﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Xml;

namespace Parallel3M.parallel3m.framework
{
    public class ParallelElement
    {
        public String id;
        public String name;
        public int payloadcount = 0;
        public int status;
        public ArrayList inputConnections=new ArrayList();
        public ArrayList outputConnections=new ArrayList();

        //
        public ParallelApplication application;
        public XmlNode node;
        public Hashtable parseParameters = new Hashtable();
        //parser first
        public virtual void PreParse(){

            XmlAttributeCollection nodeatts = node.Attributes;
            foreach (XmlAttribute att in nodeatts)
            {
                parseParameters.Add(att.Name, att.Value);
            }
            id = Guid.NewGuid().ToString();
            name = (String)parseParameters["name"];
        }

        //parser post
        public virtual void PostParse()
        {
        }

    }
}
